{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# pry-doc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "true"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "### PATHの読み込み\n",
    "#require \"/root/git_jupyter_notebook/Ruby/vendor/bundle/ruby/2.3.0/gems/pry-doc-0.10.0/lib/pry-doc\"\n",
    "require \"/Users/ftakao2007/jupyter/vendor/bundle/ruby/2.3.0/gems/pry-doc-0.10.0/lib/pry-doc\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\u001b[1mFrom:\u001b[0m array.c (C Method):\n",
      "\u001b[1mOwner:\u001b[0m Array\n",
      "\u001b[1mVisibility:\u001b[0m public\n",
      "\u001b[1mSignature:\u001b[0m to_h()\n",
      "\u001b[1mNumber of lines:\u001b[0m 5\n",
      "\n",
      "Returns the result of interpreting \u001b[1mary\u001b[0m as an array of\n",
      "<tt>[key, value]</tt> pairs.\n",
      "\n",
      "   [[\u001b[33m:foo\u001b[0m, \u001b[33m:bar\u001b[0m], [\u001b[1;34m1\u001b[0m, \u001b[1;34m2\u001b[0m]].to_h\n",
      "     \u001b[1;34m# => {:foo => :bar, 1 => 2}\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "### 動作確認\n",
    "show-doc Array#to_h"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# ruby-ldap"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "true"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "### PATHの読み込み\n",
    "#require \"/root/git_jupyter_notebook/Ruby/vendor/bundle/ruby/2.3.0/gems/ruby-ldap-0.9.19/lib/ldap\"\n",
    "require \"/Users/ftakao2007/jupyter/jupyter_notebook/Ruby/vendor/bundle/ruby/2.3.0/gems/ruby-ldap-0.9.19/lib/ldap\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "#<LDAP::Conn:0x007fc3a3043328 @args=[\"10.136.3.181\", 3390], @sasl_quiet=false>\n"
     ]
    }
   ],
   "source": [
    "### 動作確認\n",
    "conn = LDAP::Conn.new('10.136.3.181', 3390)\n",
    "conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3)\n",
    "conn.bind(\"cn=Manager,dc=joruri,dc=example,dc=com\",\"pass\")\n",
    "p conn\n",
    "conn.unbind"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Ruby 2.3.1",
   "language": "ruby",
   "name": "ruby"
  },
  "language_info": {
   "file_extension": ".rb",
   "mimetype": "application/x-ruby",
   "name": "ruby",
   "version": "2.3.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
